package com.brainydroid.items;

import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.brainydroid.framework.Object;

public class Text_box extends Object {

	public String str_;
	public int Textcolor_;
	BitmapFont font_;
	
	
	public Text_box(float x, float y, String s, int color) {
		setPosition(x,y);
		setTextColor(color);
		setText(s);
		}
	
	public void setTextColor(int color) {
		Textcolor_ = color;
	}

	public void setText(String txt){
		str_ = txt;
	}
	
	public void setfont(	BitmapFont f)
	{
		font_ = f;		
	}
	

	@Override
	public boolean istouch(float x,float y,float sx, float sy){
		return (x >= this.getAbsx() && x <= this.getAbsx()+this.width_ && y >= this.getAbsy() && y <= this.getAbsy()+this.height_);
	}
	
	@Override
	protected void onTouchDown() {
		// TODO Auto-generated method stub
	}

	@Override
	protected void onTouchUp() {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void onTouchLong() {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void onTouchDrag(float x, float y) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void update(float deltatime) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void draw(SpriteBatch batch,float scalex, float scaley) {
		// TODO Auto-generated method stub
		font_.draw(batch,str_, scalex * x_, scaley * y_);
	}

	
}
